<?php

use yii\widgets\Pjax;
use backend\components\helper\EasyHtml;
use backend\components\widget\adminLTE\GridView;

/* @var $this  yii\web\View */
/* @var $model mdm\admin\models\BizRule */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $searchModel mdm\admin\models\searchs\BizRule */

$this->title = Yii::t('rbac-admin', 'Rules');
$this->params['breadcrumbs'][] = $this->title;

?>
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title"><?= EasyHtml::encode($this->title) ?></h3>
                <div class="box-tools pull-right">
                    <?= EasyHtml::iconLink('新增', ['create'], [
                        'icon' => 'plus',
                        'class' => 'btn btn-success'
                    ]) ?>
                </div>
            </div>
            <div class="box-tools form-inline">
                <?php echo $this->render('_search', ['model' => $searchModel]); ?>
                <div class="box-body">
                    <?php Pjax::begin(); ?>
                        <?=GridView::widget([
                            'dataProvider' => $dataProvider,
                            //'filterModel' => $searchModel,
                            'columns' => [
                                ['class' => 'yii\grid\SerialColumn'],
                                [
                                    'attribute' => 'name',
                                    'label' => Yii::t('rbac-admin', 'Name'),
                                ],
                                ['class' => 'backend\components\widget\adminLTE\ActionColumn',],
                            ],
                        ]);
                        ?>
                    <?php Pjax::end(); ?>
                </div>
            </div>
        </div>
    </div>
</div>
